﻿using System;
using Nofs.Net.nofs.metadata.interfaces;
using Nofs.Net.Annotations;
using biz.ritter.javapi.lang;

namespace Nofs.Net.AnnotationDriver
{
    public sealed class MarkerToAnnotationTranslator
    {
        public static Type ToAnnotation(MarkerTypes marker) //throws Exception 
        {
            switch (marker)
            {
                case MarkerTypes.NeedsContainer:
                    return typeof(NeedsContainerAttribute);
                case MarkerTypes.NeedsContainerManager:
                    return typeof(NeedsContainerManagerAttribute);
                case MarkerTypes.FolderObject:
                    return typeof(FolderObjectAttribute);
                case MarkerTypes.Executable:
                    return typeof(ExecutableAttribute);
                case MarkerTypes.DomainObject:
                    return typeof(DomainObjectAttribute);
                case MarkerTypes.RootFolderObject:
                    return typeof(RootFolderObjectAttribute);
                default:
                    throw new System.Exception("unknown marker type");
            }
        }
    }

}
